package com.guojian.common.proxy;

import java.lang.reflect.Proxy;

/**
 * 
 * JDK代理工厂模式
 * @author GuoJian
 *
 */
public class JdkProxyFactory extends ProxyFactory {

	@SuppressWarnings("unchecked")
	@Override
	protected <T> T createProxyInstance(T target) {
		return (T) Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), new JdkProxyHandler(target));
	}

}
